export default function(sequelize, DataTypes) {
  return sequelize.define('user_friend_group', {
    _account: {
      type: DataTypes.STRING(15),
      allowNull: false,
      primaryKey: true
    },
    _friend_account: {
      type: DataTypes.STRING(15),
      allowNull: false
    },
    _session_id: {
      type: DataTypes.STRING(200),
      allowNull: false,
      primaryKey: true
    },
    _type: {
      type: DataTypes.INTEGER(1),
      allowNull: false,
      comment: "0好友1群聊"
    },
    _remark: {
      type: DataTypes.STRING(25),
      allowNull: true,
      comment: "备注"
    }
  }, {
    sequelize,
    tableName: 'user_friend_group',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "_session_id" },
          { name: "_account" },
        ]
      },
    ]
  });
};
